<template>
  <div id="app" class="app-view">
      <router-view v-if="isRouterAlive"></router-view>
  </div>
</template>

<script>
import { ref, nextTick, provide } from 'vue';

export default {
  name: 'App',
  components: {},
  setup() {
      const isRouterAlive = ref(true);
      const reload = () => {
          isRouterAlive.value = false;
          nextTick(() => {
              isRouterAlive.value = true;
          });
      };
      provide('reload', reload);
      return {
          isRouterAlive,
      };
  },
};
</script>
